


//修改密码
function modfiyPassWord() {
	
//	var select = document.getElementById('question');
//	var question = $("#question").val;
//	var answer = $("#answer").val;
//	if (question == "") {
//		answer = "";
//	}
	
//	var actionurl=$('form').attr('action');//提交路径
//	var checkurl=$('form').attr('check');//验证路径
	var url = "userInfoController.do?modifyPassWord";
	 var formData = new Object();
	var data=$(":input").each(function() {
		 formData[this.name] =$("#"+this.name ).val();
	});


	$.ajax({
		async : false,
		cache : false,
		type : 'POST',
		url : url,
		data :formData,
		success : function(data) {
			var d = $.parseJSON(data);
			if (d.success) {
				alert(d.msg);
				// var url= "/indexController.do?index";
				// location.href = url;
//				setTimeout("window.location.href='"+actionurl+"'", 1000);
			} else {
				alert(d.msg);
			}
		},

		error : function() {// 请求失败处理函数
			alert("修改失败!");
		}

	});
}

